Many internet applications need to maintain accurate communication session states on the server side for better security and performance. However, communication sessions are vulnerable to hijacking because messages are commonly transmitted over the unsecured internet. For example, a hacker could trap a message, modify it, replace it with its own, or replay the same message multiple times. Existing solutions for protecting the integrity of a communication session rely upon encrypting an entire message, transmitting the encrypted message over the internet, and decrypting the message at the destination. For example, HTTPS (hypertext transfer protocol secured) and SSH (secure shell) use such a technique.
While full-message-encryption prevents messages from being observed, full-message-encryption is quite costly. Moreover, the problem of secure communication is compounded because for security and performance reasons many internet servers do not support persistent connections such as HTTPS keep-alive. Therefore, each message has to be transmitted over a new connection, whose establishment goes through the entire process of the HTTPS handshake protocol. The HTTPS handshake protocol involves a private key decryption operation which is known to be more expensive than symmetric message encryption/decryption.
For applications that need to protect the message content from being observed, the above-mentioned full-message-encryption process is likely a necessary expense. However, many applications do not mind that the message content is observed so long as the message content is not altered or used malevolently. For example, stock quotes and news reports are intended to be viewed publicly but need to be reliable. Therefore, while full-message-encryption for publicly viewable messages will ensure message content integrity, it will waste resources on preventing the public viewing of the messages. Consequently, in a server-client communication process, a solution is desired for ensuring the integrity of a publicly viewable message during transmission without wasting resources on preventing the public viewing of the message during transmission.